// app.js
// 运行utils文件，注册为全局方法
import './utils/utils'
import './utils/http'

App({
  globalData: {},
  token: '',
  refreshToken: '',
  onLaunch () {
    this.getToken('token')
    this.getToken('refreshToken')
  },
  getToken (name) {
    this[name] = wx.getStorageSync(name)
  },
  setToken (name, token) {
    this[name] = token
    wx.setStorageSync(name, token)
  }
})
